<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
        >
<h:head>
    <title>Facelet Title</title>
</h:head>
<h:body>
    <h:form id="my">
        <h:outputText value="#{index.address}"></h:outputText>
        <br/>
        <p:dialog widgetVar="login1" modal="true">
            <h:panelGrid rendered="#{!clientSession.ifLogin}" columns="2">
                <h:outputLabel value="用户名："/>
                <h:inputText value="#{bbsLogin.urn}"/>
                <h:outputLabel value="密码："/>
                <h:inputText value="#{bbsLogin.pwd}"/>
                <h:commandButton value="登录"
                                 action="#{bbsLogin.checkUserWithoutRedirecting}"
                                 onclick="login1.hide();"></h:commandButton>
            </h:panelGrid>
        </p:dialog>

        <p:dialog widgetVar="login2" modal="true">
            <h:outputText value="123"></h:outputText>
        </p:dialog>
        <p:commandButton value="登录" onclick="login1.show();" type="button"></p:commandButton>
    </h:form>
</h:body>
</html>

